package com.woniu.command.matcommand;

import com.woniu.command.Command;
import com.woniu.command.handler.MatCommandHandler;
import com.woniu.util.ApplicationContextHolder;

public class ReadyCommand implements Command<String> {
    private MatCommandHandler handler;
    @Override
    public void execute (String s) {
        handler.ready(s);
    }

    public ReadyCommand () {
        //ApplicationContextHolder.getApplicationContext()拿到ApplicationContext
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(MatCommandHandler.class);
    }
}
